<template>
  <div class="apply-dialog">
    <el-dialog
      title=""
      :visible.sync="dialogVisible"
      :fullscreen="true"
      :before-close="handleClose"
      :close-on-click-modal="false"
      :show-close="false"
    >
      <!--      <div slot="title" class="flex flex-row align-center justify-content-end">
        <div class="btn-list flex flex-row align-center">
          <div class="ml50" @click="handleClose">
            <i class="el-icon-close cursor-p font22 line-height-32" />
          </div>
        </div>
      </div>-->
      <div slot="title" class="flex flex-row align-center justify-content-end">
        <div class="btn-list flex flex-row align-center">
          <el-button
            type="primary"
            size="mini"
            :disabled="submitDisabled"
            @click="submitAction"
          >
            提交
          </el-button>
          <el-button type="primary" size="mini" @click="handlePrint(printData)">
            导出PDF
          </el-button>
          <div class="ml50" @click="handleClose">
            <i class="el-icon-close cursor-p font22 line-height-32" />
          </div>
        </div>
      </div>
      <div class="app-container">
        <el-form
          ref="ruleForm"
          :model="ruleForm"
          :rules="rules"
          label-width="120px"
          class="mb5"
        />
        <div v-if="dialogVisible" id="printFrom" class="text item">
          <el-card
            class="box-card apply-box mt10 mb20"
          >
            <el-form
              ref="annualForm"
              :model="annualForm"
              label-width="120px"
              class="mb5"
            >
              <div class="annualForm">
                <div
                  class="title flex flex-row text-center justify-content-center align-center font18"
                >
                  <span>{{ globalConfig.fullName }}医疗技术临床应用情况报告表（{{ annualFormNew.createTime.substring(0, 4) }}）年度</span>
                </div>
                <hr
                  style="background-color: #d9d9d9; border:0; height:1px;"
                  class="mt20 mb20"
                >
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="120px" label="医疗技术名称">
                      <el-input
                        v-model="annualFormNew.name"
                        :style="{width:'100%'}"
                        disabled
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="120px" label="准入日期" class="ml30">
                      <el-date-picker
                        v-model="annualFormNew.openTime"
                        :style="{width:'100%'}"
                        type="date"
                        disabled
                        placeholder="准入日期"
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="120px" label="准入文号" class="ml30">
                      <el-input
                        v-model="annualFormNew.approvalNumber"
                        :style="{width:'100%'}"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="120px" label="项目编号">
                      <el-input
                        v-model="annualFormNew.projectNo"
                        :style="{width:'100%'}"
                        disabled
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="120px" label="负责人"  class="ml30">
                      <el-input
                        v-model="annualFormNew.name"
                        :style="{width:'100%'}"
                        disabled
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="120px" label="填报人" class="ml30">
                      <el-input
                        v-model="annualFormNew.projectNo"
                        :style="{width:'100%'}"
                        disabled
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
                <div
                  class="title flex flex-row text-center justify-content-center align-center font18"
                >
                  <span>{{ annualFormNew.createTime.substring(0, 4) }}年度医疗技术临床应用评价表</span>
                </div>
                <hr
                  style="background-color: #d9d9d9; border:0; height:1px;"
                  class="mt20 mb20"
                >
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="120px" label="技术名称">
                      <el-input
                        v-model="medicalTechnology.technologyName"
                        :style="{width:'100%'}"
                        disabled
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="180px" label="项目起始（复审）日期">
                      <el-date-picker
                        v-model="medicalTechnology.startDate"
                        :style="{width:'100%'}"
                        type="date"
                        placeholder="项目起始（复审）日期"
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item
                      label="开展科室"
                      prop="applyDeptId"
                    >
                      <el-select
                        v-model="medicalTechnology.department"
                        :style="{width:'100%'}"
                        placeholder="开展择科室"
                        filterable
                        clearable
                        value=""
                      >
                        <el-option
                          v-for="(item, index) in structureList"
                          :key="item.id"
                          :value="item.id"
                          :label="item.depName"
                        />

                      </el-select>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="150px" label="本年度开展例数">
                      <el-input
                        v-model="medicalTechnology.totalCases"
                        :style="{width:'100%'}"
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="180px" label="联系人">
                      <el-input
                        v-model="medicalTechnology.contactPerson"
                        :style="{width:'100%'}"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                  >
                    <el-form-item label-width="10px">
                      <span style="line-height:30px;font-size: 16px;font-weight: 600">检查内容</span>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="12"
                  >
                    <el-form-item
                      label="该项医疗技术被卫生部废除或者禁止使用"
                      label-width="400px"
                    >
                      <el-radio-group
                        v-model="medicalTechnology.isBanned"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'是',value:1},{label:'否',value:0}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="12"
                  >
                    <el-form-item
                      label="主要专业技术人员或设备发生变动"
                      label-width="400px"
                    >
                      <el-radio-group
                        v-model="medicalTechnology.personnelOrEquipmentChange"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'是',value:1},{label:'否',value:0}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-col>

                </el-row>

                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="12"
                  >
                    <el-form-item
                      label="发生于该项技术直接相关的严重不良后果"
                      label-width="400px"
                    >
                      <el-radio-group
                        v-model="medicalTechnology.severeAdverseOutcome"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'是',value:1},{label:'否',value:0}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="12"
                  >
                    <el-form-item
                      label="存在严重医疗质量和安全隐患"
                      label-width="400px"
                    >
                      <el-radio-group
                        v-model="medicalTechnology.safetyIssues"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'是',value:1},{label:'否',value:0}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-col>

                </el-row>

                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="12"
                  >
                    <el-form-item
                      label="存在伦理缺陷"
                      label-width="400px"
                    >
                      <el-radio-group
                        v-model="medicalTechnology.ethicalIssues"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'是',value:1},{label:'否',value:0}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="12"
                  >
                    <el-form-item
                      label="疗效不确切"
                      label-width="400px"
                    >
                      <el-radio-group
                        v-model="medicalTechnology.unclearEffectiveness"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'是',value:1},{label:'否',value:0}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-col>

                </el-row>

                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="12"
                  >
                    <el-form-item
                      label="是否有省级以上卫生行政部门规定的需要暂停其他情形"
                      label-width="400px"
                    >
                      <el-radio-group
                        v-model="medicalTechnology.needsSuspend"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'是',value:1},{label:'否',value:0}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-col>

                </el-row>
                <hr
                  style=" border-color: #d9d9d9;border-bottom: 1px;border-style: dashed; height:0;overflow: hidden"
                  class="mt20 mb20"
                >
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="12"
                  >
                    <el-form-item
                      label="检查结果"
                      label-width="130px"
                    >
                      <el-radio-group
                        v-model="medicalTechnology.reviewResult"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'改进',value:1},{label:'继续',value:2},{label:'暂缓',value:3}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-col>

                </el-row>
                <div
                  class="title flex flex-row text-center justify-content-center align-center font18"
                >
                  <span>{{ annualFormNew.createTime.substring(0, 4) }}年度医疗技术临床应用情况报告表</span>
                </div>
                <hr
                  style="background-color: #d9d9d9; border:0; height:1px;"
                  class="mt20 mb20"
                >
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="技术名称">
                      <el-input
                        v-model="clinicalApplicationReport.technologyName"
                        :style="{width:'100%'}"
                        disabled
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="联系人">
                      <el-input
                        v-model="clinicalApplicationReport.contactPerson"
                        :style="{width:'100%'}"
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="联系电话">
                      <el-input
                        v-model="clinicalApplicationReport.contactPhone"
                        :style="{width:'100%'}"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row
                  v-if="globalConfig.fullName !== 'SHZY'"
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="相应诊疗科目">
                      <el-input
                        v-model="clinicalApplicationReport.relatedDiagnosisSubject"
                        :style="{width:'100%'}"
                      />
                    </el-form-item>
                  </el-col>

                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="准入文号">
                      <el-input
                        v-model="annualFormNew.approvalNumber"
                        :style="{width:'100%'}"
                        disabled
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="准入日期">
                      <el-date-picker
                        v-model="clinicalApplicationReport.approvalDate"
                        :style="{width:'100%'}"
                        type="date"
                        placeholder="准入日期"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                  >
                    <el-form-item
                      label="所属科室"
                      label-width="130px"
                    >
                      <el-select
                        v-model="clinicalApplicationReport.department"
                        :style="{width:'100%'}"
                        placeholder="选择所属科室"
                        filterable
                        clearable
                        value=""
                      >
                        <el-option
                          v-for="(item, index) in structureList"
                          :key="item.id"
                          :value="item.id"
                          :label="item.depName"
                        />

                      </el-select>
                    </el-form-item>
                  </el-col>

                </el-row>
                <hr
                  style=" border-color: #d9d9d9;border-bottom: 1px;border-style: dashed; height:0;overflow: hidden"
                  class="mt20 mb20"
                >
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                    style="display: flex;"
                  >
                    <el-form-item label-width="130px" label="诊疗病例数">
                      <el-input
                        v-model="clinicalApplicationReport.totalCases"
                        :style="{width:'100%'}"
                      />
                    </el-form-item>
                    <span style="line-height:30px;font-size: 14px;padding-left: 5px">例</span>
                  </el-col>

                  <el-col
                    :span="8"
                    style="display: flex;"
                  >
                    <el-form-item
                      label="不良反应"
                      label-width="130px"
                    >
                      <el-radio-group
                        v-model="clinicalApplicationReport.adverseReactions"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <el-input
                        v-model="clinicalApplicationReport.adverseReactionCases"
                        :style="{width:'50px',marginLeft:'20px'}"
                      />
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px">例</span>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                    style="display: flex;"
                  >
                    <el-form-item
                      label="适度掌握情况"
                      label-width="110px"
                    >
                      <el-radio-group
                        v-model="clinicalApplicationReport.suitabilityCompliance"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'不符合',value:0},{label:'符合',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <el-input
                        v-model="clinicalApplicationReport.unsuitableCases"
                        :style="{width:'50px',marginLeft:'20px'}"
                      />
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px">例</span>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                    style="display: flex;"
                  >
                    <el-form-item
                      label="并发症"
                      label-width="130px"
                    >
                      <el-radio-group
                        v-model="clinicalApplicationReport.complications"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <el-input
                        v-model="clinicalApplicationReport.complicationCases"
                        :style="{width:'50px',marginLeft:'20px'}"
                      />
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px">例</span>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                    style="display: flex;"
                  >
                    <el-form-item
                      label="随访数"
                      label-width="110px"
                    >
                      <el-radio-group
                        v-model="clinicalApplicationReport.followUp"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'不符合',value:0},{label:'符合',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <el-input
                        v-model="clinicalApplicationReport.followUpCases"
                        :style="{width:'50px',marginLeft:'20px'}"
                      />
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px">例</span>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="16"
                    style="display: flex;"
                  >
                    <el-form-item
                      label="临床应用效果"
                      label-width="130px"
                    >
                      <span style="line-height:30px;font-size: 14px;">有效</span>
                      <el-input
                        v-model="clinicalApplicationReport.clinicalEffectivenessEffective"
                        :style="{width:'50px'}"
                      />
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px">例</span>

                      <span style="line-height:30px;font-size: 14px;margin-left: 20px">无效</span>
                      <el-input
                        v-model="clinicalApplicationReport.clinicalEffectivenessIneffective"
                        :style="{width:'50px'}"
                      />
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px">例</span>
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px;color: #0d84ff;">附诊疗情况说明</span>

                      <span style="line-height:30px;font-size: 14px;margin-left: 20px">不确切</span>
                      <el-input
                        v-model="clinicalApplicationReport.clinicalEffectivenessUncertain"
                        :style="{width:'50px'}"
                      />
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px">例</span>
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px;color: #0d84ff;">附诊疗情况说明</span>
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                  >
                    <el-form-item label-width="10px">
                      <span style="line-height:30px;font-size: 16px;font-weight: 600">开展的医疗技术是否存在应当立即停止临床应用的情形</span>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                    style="display: flex;"
                  >
                    <el-form-item
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">1、该项医疗技术被卫生部废除或禁止使用：</span>
                      <el-radio-group
                        v-model="clinicalApplicationReport.suspendedReason1"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px;color: #0d84ff;">附诊疗情况说明</span>
                    </el-form-item>
                  </el-col>

                </el-row>
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                    style="display: flex;"
                  >
                    <el-form-item
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">2、从事该项医疗技术主要专业技术人员或者关键设备、设施及其他辅助条件发生变化，不能正常临床应用：</span>
                      <el-radio-group
                        v-model="clinicalApplicationReport.suspendedReason2"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px;color: #0d84ff;">附诊疗情况说明</span>
                    </el-form-item>
                  </el-col>

                </el-row>
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                    style="display: flex;"
                  >
                    <el-form-item
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">3、发生与该项医疗技术直接相关的严重不良后果：</span>
                      <el-radio-group
                        v-model="clinicalApplicationReport.suspendedReason3"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px;color: #0d84ff;">附诊疗情况说明</span>
                    </el-form-item>
                  </el-col>

                </el-row>
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                    style="display: flex;"
                  >
                    <el-form-item
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">4、该项医疗技术存在医疗质量和医疗安全隐患：</span>
                      <el-radio-group
                        v-model="clinicalApplicationReport.suspendedReason4"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px;color: #0d84ff;">附诊疗情况说明</span>
                    </el-form-item>
                  </el-col>

                </el-row>
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                    style="display: flex;"
                  >
                    <el-form-item
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">5、该项医疗技术存在伦理缺陷：</span>
                      <el-radio-group
                        v-model="clinicalApplicationReport.suspendedReason5"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px;color: #0d84ff;">附诊疗情况说明</span>
                    </el-form-item>
                  </el-col>

                </el-row>
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                    style="display: flex;"
                  >
                    <el-form-item
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">6、该项医疗技术临床应用效果不确切：</span>
                      <el-radio-group
                        v-model="clinicalApplicationReport.suspendedReason6"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px;color: #0d84ff;">附诊疗情况说明</span>
                    </el-form-item>
                  </el-col>

                </el-row>
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                  >
                    <el-form-item label-width="10px">
                      <span style="line-height:30px;font-size: 16px;font-weight: 600">开展的医疗技术是否存在报请市卫生行政部门决定重新进行医疗技术临床应用能力技术审核的情形</span>
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                    style="display: flex;"
                  >
                    <el-form-item
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">1、与该项医疗技术有关的专业技术人员或者设备、设施、辅助条件发生变化，可能会对医疗技术临床应用带来不确定后果的：</span>
                      <el-radio-group
                        v-model="clinicalApplicationReport.reviewReason1"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px;color: #0d84ff;">附诊疗情况说明</span>
                    </el-form-item>
                  </el-col>

                </el-row>
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                    style="display: flex;"
                  >
                    <el-form-item
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">2、该项医疗技术非关键环节发生改变的：</span>
                      <el-radio-group
                        v-model="clinicalApplicationReport.reviewReason2"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px;color: #0d84ff;">附诊疗情况说明</span>
                    </el-form-item>
                  </el-col>

                </el-row>
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                    style="display: flex;"
                  >
                    <el-form-item
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">3、准予该项医疗技术诊疗科目登记后1年内未在临床应用的：</span>
                      <el-radio-group
                        v-model="clinicalApplicationReport.reviewReason3"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px;color: #0d84ff;">附诊疗情况说明</span>
                    </el-form-item>
                  </el-col>

                </el-row>
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                    style="display: flex;"
                  >
                    <el-form-item
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">4、该项医疗技术中止1年以上拟重新开展的：</span>
                      <el-radio-group
                        v-model="clinicalApplicationReport.reviewReason4"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                      <span style="line-height:30px;font-size: 14px;padding-left: 5px;color: #0d84ff;">附诊疗情况说明</span>
                    </el-form-item>
                  </el-col>

                </el-row>

                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                  >
                    <el-form-item
                      label="其他报告事项"
                      label-width="130px"
                    >
                      <el-radio-group
                        v-model="clinicalApplicationReport.otherIssues"
                        :style="{ width: 130 }"
                      >
                        <el-radio
                          v-for="(item, index) in [{label:'无',value:0},{label:'有',value:1}]"
                          :key="index"
                          class="incat-radio incat-mini"
                          :style="{display: 'inline-block'}"
                          :label="item.value"
                        >
                          <template>{{ item.label }}</template>
                        </el-radio>
                      </el-radio-group>
                    </el-form-item>
                  </el-col>
                </el-row>

                <hr
                  style=" border-color: #d9d9d9;border-bottom: 1px;border-style: dashed; height:0;overflow: hidden"
                  class="mt20 mb20"
                >
                <el-row
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                  >
                    <el-form-item
                      label="报告科室"
                      label-width="100px"
                    >
                      本报告内容和所附资料均真实、有效
                    </el-form-item>
                  </el-col>

                </el-row>

                <div
                  class="title flex flex-row text-center justify-content-center align-center font18"
                >
                  <span>{{ annualFormNew.createTime.substring(0, 4) }}年度医疗技术跟踪评价表</span>
                </div>
                <hr
                  style="background-color: #d9d9d9; border:0; height:1px;"
                  class="mt20 mb20"
                >
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="技术名称">
                      <el-input
                        v-model="medicalTechnologyTracking.technologyName"
                        :style="{width:'100%'}"
                        disabled
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="技术准入日期">
                      <el-date-picker
                        v-model="medicalTechnologyTracking.approvalDate"
                        :style="{width:'100%'}"
                        type="date"
                        placeholder="准入日期"
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="目前项目负责人">
                      <el-input
                        v-model="medicalTechnologyTracking.responsiblePerson"
                        :style="{width:'100%'}"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="本年度开展例数">
                      <el-input
                        v-model="medicalTechnologyTracking.annualCases"
                        :style="{width:'100%'}"
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item
                      label="所属科室"
                      label-width="130px"
                    >
                      <el-select
                        v-model="medicalTechnologyTracking.department"
                        :style="{width:'100%'}"
                        placeholder="选择所属科室"
                        filterable
                        clearable
                        value=""
                      >
                        <el-option
                          v-for="(item, index) in structureList"
                          :key="item.id"
                          :value="item.id"
                          :label="item.depName"
                        />

                      </el-select>
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="技术开展日期">
                      <el-date-picker
                        v-model="medicalTechnologyTracking.deploymentDate"
                        :style="{width:'100%'}"
                        type="date"
                        placeholder="开展日期"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="职称">
                      <el-input
                        v-model="medicalTechnologyTracking.position"
                        :style="{width:'100%'}"
                      />
                    </el-form-item>
                  </el-col>
                  <el-col
                    :span="8"
                  >
                    <el-form-item label-width="130px" label="随访比例">
                      <el-input
                        v-model="medicalTechnologyTracking.followUpRatio"
                        :style="{width:'100%'}"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
                <hr
                  style=" border-color: #d9d9d9;border-bottom: 1px;border-style: dashed; height:0;overflow: hidden"
                  class="mt20 mb20"
                >
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                  >
                    <el-form-item
                      label=""
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">适应症掌握情况</span>
                      <el-input
                        v-model="medicalTechnologyTracking.indicationStatus"
                        type="textarea"
                        :rows="3"
                        placeholder="请输入"
                        :style="{ width: '100%' }"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                  >
                    <el-form-item
                      label=""
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">技术开展的人员资质是否符合要求</span>
                      <el-input
                        v-model="medicalTechnologyTracking.personnelQualification"
                        type="textarea"
                        :rows="3"
                        placeholder="请输入"
                        :style="{ width: '100%' }"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                  >
                    <el-form-item
                      label=""
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">应用本技术的病例投诉及纠纷情况</span>
                      <el-input
                        v-model="medicalTechnologyTracking.medicalDisputes"
                        type="textarea"
                        :rows="3"
                        placeholder="请输入"
                        :style="{ width: '100%' }"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                  >
                    <el-form-item
                      label=""
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">应用本技术中是否出现医疗差错或事故</span>
                      <el-input
                        v-model="medicalTechnologyTracking.misuseOrAbuse"
                        type="textarea"
                        :rows="3"
                        placeholder="请输入"
                        :style="{ width: '100%' }"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>
                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="24"
                  >
                    <el-form-item
                      label=""
                      prop="remark"
                      label-width="10px"
                    >
                      <span style="line-height:30px;font-size: 14px;">发生并发症、不良反应等情况</span>
                      <el-input
                        v-model="medicalTechnologyTracking.adverseEvents"
                        type="textarea"
                        :rows="3"
                        placeholder="请输入"
                        :style="{ width: '100%' }"
                      />
                    </el-form-item>
                  </el-col>
                </el-row>

                <el-row
                  type="flex"
                  :gutter="30"
                  justify="start"
                  align="top"
                >
                  <el-col
                    :span="16"
                  >
                    <el-form-item
                      label="注：如有其他需说明情况可附页。"
                      label-width="300px"
                    >
                      <FileUpload :element="uploadConfig" :preview="false" @fileList="fileList" />
                    </el-form-item>
                  </el-col>
                </el-row>
              </div>
              <div
                class="title flex flex-row text-center justify-content-center align-center font18"
              >
                <span>{{ annualFormNew.createTime.substring(0, 4) }}年度医疗技术评估报告</span>
              </div>
              <hr
                style="background-color: #d9d9d9; border:0; height:1px;"
                class="mt20 mb20"
              >
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="8"
                >
                  <el-form-item label-width="130px" label="技术名称">
                    <el-input
                      v-model="medicalTechnologyEvaluation.technologyName"
                      :style="{width:'100%'}"
                      disabled
                    />
                  </el-form-item>
                </el-col>
                <el-col
                  :span="8"
                >
                  <el-form-item label-width="130px" label="技术准入日期">
                    <el-date-picker
                      v-model="medicalTechnologyEvaluation.technologyEntryDate"
                      :style="{width:'100%'}"
                      type="date"
                      placeholder="准入日期"
                    />
                  </el-form-item>
                </el-col>
                <el-col
                  :span="8"
                >
                  <el-form-item label-width="130px" label="目前项目负责人">
                    <el-input
                      v-model="medicalTechnologyEvaluation.projectLeader"
                      :style="{width:'100%'}"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="8"
                >
                  <el-form-item label-width="130px" label="本年度开展例数">
                    <el-input
                      v-model="medicalTechnologyEvaluation.casesPerformed"
                      :style="{width:'100%'}"
                    />
                  </el-form-item>
                </el-col>
                <el-col
                  :span="8"
                >
                  <el-form-item
                    label="所属科室"
                    label-width="130px"
                  >
                    <el-select
                      v-model="medicalTechnologyEvaluation.department"
                      :style="{width:'100%'}"
                      placeholder="选择所属科室"
                      filterable
                      clearable
                      value=""
                    >
                      <el-option
                        v-for="(item, index) in structureList"
                        :key="item.id"
                        :value="item.id"
                        :label="item.depName"
                      />

                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col
                  :span="8"
                >
                  <el-form-item label-width="130px" label="职称">
                    <el-input
                      v-model="medicalTechnologyEvaluation.position"
                      :style="{width:'100%'}"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
              <hr
                style=" border-color: #d9d9d9;border-bottom: 1px;border-style: dashed; height:0;overflow: hidden"
                class="mt20 mb20"
              >
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="24"
                >
                  <el-form-item label-width="10px">
                    <span style="line-height:30px;font-size: 16px;font-weight: 600">评估内容</span>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="24"
                >
                  <el-form-item
                    label=""
                    label-width="10px"
                  >
                    <span style="line-height:30px;font-size: 14px;">一、请评估本年度技术应用开展情况（包括适应症把握；是否按照技术管理规范的要求开展本技术；病人随访；应用本技术的病例投诉及纠纷情况；有无并发症、合并症、医疗意外事件、不良反应事件、差错事故发生，500字左右）</span>
                    <el-input
                      v-model="medicalTechnologyEvaluation.applicationSituation"
                      type="textarea"
                      :rows="4"
                      placeholder="请输入"
                      :style="{ width: '100%' }"
                    />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="24"
                >
                  <el-form-item
                    label=""
                    label-width="10px"
                  >
                    <span style="line-height:30px;font-size: 14px;">二、本技术开展中人员、设备有无重大变动</span>
                    <el-input
                      v-model="medicalTechnologyEvaluation.personnelEquipmentStatus"
                      type="textarea"
                      :rows="4"
                      placeholder="请输入"
                      :style="{ width: '100%' }"
                    />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="24"
                >
                  <el-form-item
                    label=""
                    label-width="10px"
                  >
                    <span style="line-height:30px;font-size: 14px;">三、技术开展中需要说明的其他情况</span>
                    <el-input
                      v-model="medicalTechnologyEvaluation.improvementSuggestions"
                      type="textarea"
                      :rows="4"
                      placeholder="请输入"
                      :style="{ width: '100%' }"
                    />
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="24"
                >
                  <el-form-item label-width="10px">
                    <span style="line-height:30px;font-size: 16px;font-weight: 600">评估结论</span>
                  </el-form-item>
                </el-col>
              </el-row>

              <el-row
                type="flex"
                :gutter="30"
                justify="start"
                align="top"
              >
                <el-col
                  :span="24"
                >
                  <el-form-item
                    label=""
                    label-width="10px"
                  >
                    <el-input
                      v-model="medicalTechnologyEvaluation.evaluationOpinion"
                      type="textarea"
                      :rows="4"
                      placeholder="请输入"
                      :style="{ width: '100%' }"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
          </el-card>

          <el-card v-if="globalConfig.fullName == 'PTZX' && isShowDoc" class="box-card apply-box mb20">
            <div slot="header" class="clearfix flex flex-row align-center height32">
              <div class="line" />
              <span class="font16 ml10 flex-auto">年度限制类新增人员档案表</span>
            </div>
            <el-row :gutter="10" class="mb8">
              <el-col :span="1.5">
                <el-button
                  type="primary"
                  icon="el-icon-plus"
                  size="mini"
                  @click="handleAdd('2')"
                >新增</el-button>
              </el-col>
            </el-row>
            <el-table v-loading="loading" :data="limitNewTechDoc" stripe>
              <el-table-column label="姓名" prop="name" align="center" />
              <el-table-column label="职称" prop="position" align="center" />
              <el-table-column label="执业范围" prop="scope" align="center" />
              <el-table-column prop="isAvailable" label="工作年限是否符合要求" align="center">
                <template slot-scope="scope">
                  <div v-if="scope.row.isAvailable == '0'">
                    不符合
                  </div>
                  <div v-if="scope.row.isAvailable == '1'">
                    符合
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="培训情况" prop="trainingDetail" align="center" />
              <el-table-column label="培训证书" prop="additionalExplanation" align="left">
                <template slot-scope="scope">
                  <div v-if="scope.row.additionalExplanation&&JSON.parse(scope.row.additionalExplanation).length>0">
                    <div v-for="(item, index) in JSON.parse(scope.row.additionalExplanation)">
                      <a style="color: #0d84ff;" :href="item.url">{{ item.name }}</a>
                    </div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="新增时间" prop="newDate" align="center" />
              <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
                <template slot-scope="scope">
                  <el-button size="mini" type="text" icon="el-icon-delete" @click="handleEdit(scope.row,'2')">编辑</el-button>
                  <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row,'2')">删除</el-button>
                </template>
              </el-table-column>
            </el-table>
          </el-card>

          <el-card v-if="globalConfig.fullName == 'PTZX' && isShowDoc" class="box-card apply-box mb20">
            <div slot="header" class="clearfix flex flex-row align-center height32">
              <div class="line" />
              <span class="font16 ml10 flex-auto">年度限制类人员档案表</span>
            </div>
            <el-row :gutter="10" class="mb8">
              <el-col :span="1.5">
                <el-button
                  type="primary"
                  icon="el-icon-plus"
                  size="mini"
                  @click="handleAdd('1')"
                >新增</el-button>
              </el-col>
            </el-row>
            <el-table v-loading="loading" :data="limitTechDoc" stripe>
              <el-table-column label="姓名" prop="name" align="center" />
              <el-table-column label="职称" prop="position" align="center" />
              <el-table-column label="执业范围" prop="scope" align="center" />
              <el-table-column prop="isAvailable" label="工作年限是否符合要求" align="center">
                <template slot-scope="scope">
                  <div v-if="scope.row.isAvailable == '0'">
                    不符合
                  </div>
                  <div v-if="scope.row.isAvailable == '1'">
                    符合
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="培训情况" prop="trainingDetail" align="center" />
              <el-table-column label="培训证书" prop="additionalExplanation" align="left">
                <template slot-scope="scope">
                  <div v-if="scope.row.additionalExplanation&&JSON.parse(scope.row.additionalExplanation).length>0">
                    <div v-for="(item, index) in JSON.parse(scope.row.additionalExplanation)">
                      <a style="color: #0d84ff;" :href="item.url">{{ item.name }}</a>
                    </div>
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="250">
                <template slot-scope="scope">
                  <el-button size="mini" type="text" icon="el-icon-delete" @click="handleEdit(scope.row,'1')">编辑</el-button>
                  <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row,'1')">删除</el-button>
                </template>
              </el-table-column>
            </el-table>
          </el-card>
        </div>
      </div>
      <el-dialog title="年度限制类新增人员" append-to-body :visible.sync="innerNewDialogVisible" width="800px">
        <el-form ref="form" :model="limitNewForm" :rules="limitNewRules" label-width="100px">
          <el-row>
            <el-col :span="12">
              <el-form-item label="姓名" prop="name" style="width: 90%">
                <el-input
                  v-model="limitNewForm.name"
                  placeholder="请输入姓名"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="职称" prop="position" style="width: 90%">
                <el-input v-model="limitNewForm.position" placeholder="请输入用户职称" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="执业范围" prop="scope" style="width: 90%">
                <el-input
                  v-model="limitNewForm.scope"
                  placeholder="请输入执业范围"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="培训情况" prop="trainingDetail" style="width: 90%">
                <el-input
                  v-model="limitNewForm.trainingDetail"
                  placeholder="请输入培训情况"
                  maxlength="50"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="新增时间" prop="newDate" style="width: 90%">
                <el-date-picker
                  v-model="limitNewForm.newDate"
                  :style="{width:'100%'}"
                  type="datetime"
                  placeholder="选择新增时间"
                  value-format="yyyy-MM-dd HH:mm:ss"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="工作年限是否符合要求" prop="isAvailable" label-width="200px">
                <el-radio-group
                  v-model="limitNewForm.isAvailable"
                  :style="{ width: 150 }"
                >
                  <el-radio
                    v-for="(item, index) in [{label:'符合',value:'1'},{label:'不符合',value:'0'}]"
                    :key="index"
                    class="incat-radio incat-mini"
                    :style="{display: 'inline-block'}"
                    :label="item.value"
                  >
                    <template>{{ item.label }}</template>
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="培训证书" prop="additionalExplanation" style="width: 95%">
                <FileUpload :element="uploadConfig" :data-model="limitNewForm.additionalExplanation&&JSON.parse(limitNewForm.additionalExplanation)" :preview="false" @fileList="fileListLimitNewTechDoc" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" @click="submitDocForm('2',act)">确 定</el-button>
          <el-button @click="docCancel">取 消</el-button>
        </div>
      </el-dialog>

      <el-dialog title="年度限制类人员" append-to-body :visible.sync="innerDialogVisible" width="800px">
        <el-form ref="form" :model="limitForm" :rules="limitRules" label-width="100px">
          <el-row>
            <el-col :span="12">
              <el-form-item label="姓名" prop="name" style="width: 90%">
                <el-input
                  v-model="limitForm.name"
                  placeholder="请输入姓名"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="职称" prop="position" style="width: 90%">
                <el-input v-model="limitForm.position" placeholder="请输入用户职称" />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="执业范围" prop="scope" style="width: 90%">
                <el-input
                  v-model="limitForm.scope"
                  placeholder="请输入执业范围"
                />
              </el-form-item>
            </el-col>
            <el-col :span="12">
              <el-form-item label="培训情况" prop="trainingDetail" style="width: 90%">
                <el-input
                  v-model="limitForm.trainingDetail"
                  placeholder="请输入培训情况"
                  maxlength="50"
                />
              </el-form-item>
            </el-col>

            <el-col :span="12">
              <el-form-item label="工作年限是否符合要求" prop="isAvailable" label-width="200px">
                <el-radio-group
                  v-model="limitForm.isAvailable"
                  :style="{ width: 150 }"
                >
                  <el-radio
                    v-for="(item, index) in [{label:'符合',value:'1'},{label:'不符合',value:'0'}]"
                    :key="index"
                    class="incat-radio incat-mini"
                    :style="{display: 'inline-block'}"
                    :label="item.value"
                  >
                    <template>{{ item.label }}</template>
                  </el-radio>
                </el-radio-group>
              </el-form-item>
            </el-col>
            <el-col :span="24">
              <el-form-item label="培训证书" prop="additionalExplanation" style="width: 95%">
                <FileUpload :element="uploadConfig" :data-model="limitForm.additionalExplanation&&JSON.parse(limitForm.additionalExplanation)" :preview="false" @fileList="fileListLimitTechDoc" />
              </el-form-item>
            </el-col>
          </el-row>
        </el-form>
        <div slot="footer" class="dialog-footer">
          <el-button type="primary" @click="submitDocForm('1',act)">确 定</el-button>
          <el-button @click="docCancel">取 消</el-button>
        </div>
      </el-dialog>

    </el-dialog>
  </div>
</template>

<script>
import Vue from 'vue'
import { GenerateForm } from '@/components/VueFormMaking'
import 'form-making/dist/FormMaking.css'
Vue.component(GenerateForm.name, GenerateForm)

import { createWorkOrder } from '@/api/xjs/ns-order'
import {
  processStructure,
  newCreateYearAudit,
  newDoYearAudit,
  newCreateWorkOrder,
  newDoUpdate,
  newLimitTechDocList,
  newLimitTechDocAdd,
  newLimitTechDocUpdate,
  newLimitTechDocDel
} from '@/api/xjs/work-order'
import { listAllUser } from '@/api/system/sysuser'
import { getNewDeptList, getOrdinaryDeptList, newTreeselect } from '@/api/system/dept'
import { mapGetters } from 'vuex'
import printJS from 'print-js'
import FileUpload from '@/components/VueFormMaking/components/Upload/file.vue'
export default {
  name: 'ApplyDialog',
  components: { FileUpload },
  props: {
    value: {
      type: String,
      default: ''
    }
  },
  data() {
    return {
      printData: {
        printable: 'printFrom',
        header: '',
        ignore: ['no-print']
      },
      act: 'add',
      limitForm: {},
      limitRules: {},
      limitNewForm: {},
      limitNewRules: {},
      isShowDoc: true,
      uploadConfig: {
        options: {
          // action: "http://192.168.0.107:8002/api/v1/public/uploadFile?file_type=files"
          defaultValue: [],
          disabled: false,
          length: 9,
          tip: '',
          width: '30%'
        }
      },
      structureList: [],
      showGenForm: false,
      projectInfo: {},
      workOrdeInfo: {
        id: null,
        status: 1
      },
      loading: false,
      dialogVisible: false,
      innerDialogVisible: false,
      innerNewDialogVisible: false,
      submitDisabled: false,
      active: 0,
      total: 0,
      processStructureValue: {},
      queryParamsDoc: {
        currentPage: 1,
        pageSize: 9999,
        docType: '1'
      },
      queryParamsNewDoc: {
        currentPage: 1,
        pageSize: 9999,
        docType: '2'
      },
      tpls: [],
      newTpls: [],
      annualForm: {
        year: '',
        quarter: '',
        name: '',
        zrtime: '',
        project_no: '',
        zlkm: '',
        operating_depart: '',
        leader_name: '',
        fzrno: '',
        tbr: '',
        tbrno: '',
        xfr: '',
        xfrno: '',
        project_classify: '',
        project_id: ''
      },
      limitNewTechDoc: [],
      limitTechDoc: [],
      medicalTechnology: {}, // 2023年度医疗技术临床应用评价表
      clinicalApplicationReport: {}, // 2023年度医疗技术临床应用情况报告表
      medicalTechnologyTracking: {}, //	2023年度医疗技术跟踪评价表
      medicalTechnologyEvaluation: {}, // 2023年度医疗技术评估报告
      annualFormNew: {}, // 补充表单资料
      ruleForm: {
        workOrderId: 0,
        projectId: 0,
        title: '',
        projectNo: '',
        process: '',
        classify: '',
        state: [],
        source: '',
        source_state: '',
        process_method: '',
        tpls: {
          form_structure: [],
          form_data: []
        },
        newTpls: {},
        tasks: [],
        status: 0
      },
      rules: {
        title: [{ required: true, message: '请输入标题', trigger: 'blur' }]
      },
      remoteFunc: {
        // 获取用户列表
        async userList(resolve) {
          const res = await listAllUser({})
          const options = res.data
          resolve(options)
        },
        async deptTreeList(resolve) {
          const res = await getOrdinaryDeptList()
          resolve(res.data)
        }
      }
    }
  },
  computed: {
    ...mapGetters(['name', 'globalConfig'])
  },
  methods: {
    submitDocForm(docType) {
      console.log(docType)
      let params = {
        ...this.limitForm,
        docType,
        correlationId: this.annualFormNew.id
      }
      let params1 = {
        ...this.queryParamsDoc,
        docType,
        correlationId: this.annualFormNew.id
      }
      if (docType === '2') {
        params = {
          ...this.limitNewForm,
          docType,
          correlationId: this.annualFormNew.id
        }
        params1 = {
          ...this.queryParamsNewDoc,
          docType,
          correlationId: this.annualFormNew.id
        }
      }
      if (this.act === 'add') {
        newLimitTechDocAdd(params).then(res => {
          this.$message({
            type: 'success',
            message: '新增成功!'
          })
          this.docCancel()
          newLimitTechDocList(params1).then(response => {
            if (docType === '2') {
              this.limitNewTechDoc = response.records || []
            } else {
              this.limitTechDoc = response.records || []
            }
          })
        })
      } else {
        newLimitTechDocUpdate(params).then(response => {
          this.$message({
            type: 'success',
            message: '编辑成功!'
          })
          this.docCancel()
          newLimitTechDocList(params1).then(response => {
            if (docType === '2') {
              this.limitNewTechDoc = response.records || []
            } else {
              this.limitTechDoc = response.records || []
            }
          })
        })
      }
    },
    docCancel() {
      this.innerDialogVisible = false
      this.innerNewDialogVisible = false
    },
    handleEdit(row, docType) {
      this.act = 'edit'
      this.limitForm = {}
      this.limitNewForm = {}
      console.log(docType)
      const _row = JSON.parse(JSON.stringify(row))
      if (docType === '2') {
        this.limitNewForm = _row
        this.innerNewDialogVisible = true
      } else {
        this.limitForm = _row
        this.innerDialogVisible = true
      }
    },
    handleDelete(row, docType) {
      console.log(docType)
      const { id } = row
      let params = {
        id,
        docType,
        correlationId: this.annualFormNew.id
      }
      let params1 = {
        ...this.queryParamsDoc,
        docType,
        correlationId: this.annualFormNew.id
      }
      if (docType === '2') {
        params = {
          id,
          docType,
          correlationId: this.annualFormNew.id
        }
        params1 = {
          ...this.queryParamsNewDoc,
          docType,
          correlationId: this.annualFormNew.id
        }
      }

      newLimitTechDocDel(params).then(response => {
        this.$message({
          type: 'success',
          message: '删除成功!'
        })
        this.docCancel()
        newLimitTechDocList(params1).then(response => {
          if (docType === '2') {
            this.limitNewTechDoc = response.records || []
          } else {
            this.limitTechDoc = response.records || []
          }
        })
      })
    },
    fileList(files) {
      // this.models.applyDocsTemp = files;
      this.medicalTechnologyTracking.additionalExplanation = JSON.stringify(files)
    },
    fileListLimitNewTechDoc(files) {
      // this.models.applyDocsTemp = files;
      this.limitNewForm.additionalExplanation = JSON.stringify(files)
    },
    fileListLimitTechDoc(files) {
      // this.models.applyDocsTemp = files;
      this.limitForm.additionalExplanation = JSON.stringify(files)
    },
    getNewDeptTreeList() {
      newTreeselect().then(response => {
        this.structureList = response.records[0].level
      })
    },
    handlePrint(params) {
      printJS({
        maxWidth: 1920,
        documentTitle: `${this.globalConfig.fullName}医务一网通办`,
        printable: params.printable, // 'printFrom',
        type: params.type || 'html',
        header: params.header, // '表单',
        targetStyles: ['*'],
        ignoreElements: params.ignore || [], // ['no-print']
        properties: params.properties || null
      })
    },
    handleClose() {
      this.dialogVisible = false
      this.$emit('refreshTable')
    },
    handleAdd(docType) {
      this.act = 'add'
      this.limitForm = {}
      this.limitNewForm = {}
      if (docType === '2') {
        this.innerNewDialogVisible = true
      } else {
        this.innerDialogVisible = true
      }
    },
    open(row) {
      console.log('技术分类', row, row.projectClass)
      if (Number(row.projectClass) === 2) {
        this.isShowDoc = true
      } else {
        this.isShowDoc = false
      }
      getNewDeptList({ pageSize: 9999 }).then(response => {
        // this.resetDialog()
        this.structureList = response.records
        this.annualFormNew = row
        this.medicalTechnology.technologyName = row.name
        this.clinicalApplicationReport.technologyName = row.name
        this.medicalTechnologyTracking.technologyName = row.name
        this.medicalTechnologyEvaluation.technologyName = row.name
        this.dialogVisible = true
      })

      newLimitTechDocList({ ...this.queryParamsDoc, correlationId: row.id }).then(response => {
        this.limitTechDoc = response.records || []
      })
      newLimitTechDocList({ ...this.queryParamsNewDoc, correlationId: row.id }).then(response => {
        this.limitNewTechDoc = response.records || []
      })
    },

    resetDialog() {
      Object.assign(this.$data, this.$options.data())
    },

    getProcessNodeList() {
      processStructure({
        processId: 2
      }).then(response => {
        this.processStructureValue = response.data
        this.currentNode = this.processStructureValue.nodes[0]
        this.processStructureValue.tpls[0].form_structure.list[1].options.disabled = true
      })
    },

    submitAction() {
      const _annualFormNew = JSON.parse(JSON.stringify(this.annualFormNew))
      _annualFormNew.medicalTechnology = this.medicalTechnology
      _annualFormNew.clinicalApplicationReport = this.clinicalApplicationReport
      _annualFormNew.medicalTechnologyTracking = this.medicalTechnologyTracking
      _annualFormNew.medicalTechnologyEvaluation = this.medicalTechnologyEvaluation
      _annualFormNew.limitTechDoc = this.limitTechDoc
      _annualFormNew.limitNewTechDoc = this.limitNewTechDoc
      console.log('提交的表单数据', _annualFormNew)
      const loading = this.$loading({
        lock: true,
        text: 'Loading',
        spinner: 'el-icon-loading',
        background: 'rgba(0, 0, 0, 0.7)'
      })
      newCreateYearAudit(_annualFormNew).then((res) => {
        const id = res.records[0].id
        newDoYearAudit({ id }).then(res => {
          console.log('提交', res)

          this.$message({
            type: 'success',
            message: '提交成功!'
          })
          this.submitDisabled = false
          this.handleClose()
          // this.auditStatus = 2
          // this.$router.push({ path: '/project/applyList' })
          loading.close()
        })
      })
    }
  }
}
</script>

<style lang="scss" scoped>
/* 去掉全选按钮 */
::v-deep .el-table .disabledCheck .cell .el-checkbox__inner {
    display: none !important;
}

::v-deep .el-table .disabledCheck .cell::before {
    content: "请选择";
    text-align: center;
    line-height: 37px;
}
.app-container {
    max-width: 1230px;
    margin: 0 auto;
    background: #ebf4fa;
    border-radius: 12px;
    .apply-box {
        border-radius: 15px;
        .line {
            height: 22px;
            width: 5px;
            background: #277fd6;
        }
    }
}
</style>
